'use client';
import React from "react";
import {useRouter} from "next/navigation";

type Props = {
    children: React.ReactNode
    q: string
    c: string
}

export default function Span({children, c, q}: Props) {
    const route = useRouter()
    return (
        <span onClick={() => {
            route.push(`/question?q=${q}&c=${c}`)
        }}
              className={'p-3 text-lg font-mono'}>
                        {children}
                    </span>
    )
}